package com.demo.gateway.orderservice.service;

import com.demo.gateway.orderservice.mapper.UserMapper;
import com.demo.gateway.service.BaseService;
import com.demo.gateway.user.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Condition;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Service
public class UserService extends BaseService<User> {
    @Autowired
    UserMapper userMapper;

    public List<User> get2() {
        Example example = new Example(User.class);
        example
                .selectProperties("name")
                .and().andEqualTo("id",1);
        return userMapper.selectByExample(example);
    }
}
